CREATE EXTERNAL TABLE jms_dm.dm_business_reach_summary_month_dt
(

    taking_site_code      string comment  '始发网点code',
    sign_site_code        string comment  '目的网点code',
    subscribe_source_code string comment '订阅来源code',
    customer_code         string comment '客户code',
    customer_name         string comment '客户名',
    subscribe_source_name string comment '订阅来源name',
    taking_provider_id    string comment  '揽收省份id',
    taking_provider_desc  string comment '揽收省份name',
    taking_city_id        string comment  '揽收城市id',
    taking_city_desc      string comment '揽收城市name',
    taking_agent_code     string comment  '揽收代理区code',
    taking_agent_name     string comment '揽收代理区name',
    taking_site_name      string comment '揽收网点name',
    sign_provider_id      string comment  '签收省份id',
    sign_provider_desc    string comment '签收省份name',
    sign_city_id          string comment  '签收城市code',
    sign_city_desc        string comment '签收城市name',
    sign_agent_code       string comment  '签收网点代理区code',
    sign_agent_name       string comment '签收网点代理区name',
    sign_site_name        string comment '签收网点名',
    buss_all_cnt          bigint comment '兜底票数',
    buss_reach_cnt        bigint comment '兜底达成量',
    pres_reach_cnt        bigint comment '实际达成量',
    effect_cnt            bigint comment '时效影响量',
    taking_diff_cnt       bigint comment '跨天量',
    taking_one_diff_cnt   bigint comment '跨1天数量',
    taking_two_diff_cnt   bigint comment '跨2天数量',
    taking_three_diff_cnt bigint comment '跨3天数量',
    taking_four_diff_cnt  bigint comment '跨4天数量',
    taking_five_diff_cnt  bigint comment '跨5天数量',
    taking_six_diff_cnt   bigint comment '跨6天数量',
    taking_seven_diff_cnt bigint comment '跨7天及以上数量',
    pres_total            bigint comment '总量',
    pres_reach_sum        bigint comment '达成总量',
    flag                  tinyint comment  '是否有商务件 1是 0否',
    statistic_type        tinyint comment '1：流向统计 城市维度 2：网点-全国维度',
    statistic_date        date comment   '统计日期',
    detail_type           tinyint comment '时间分区类型 1：兜底时间 2：实际揽收时间 3:时效签收时间'
) COMMENT '商务件达成率统计-商务件兜底时间' PARTITIONED BY (
    `dt` string,dtype int comment '时间分区类型 1：兜底时间 2：实际揽收时间 3:时效签收时间')
    STORED AS PARQUET
    LOCATION '/dw/hive/jms_dm.db/external/dm_business_reach_summary_month_dt'
    TBLPROPERTIES (
        'discover.partitions' = 'false',
        'parquet.column.index.access' = 'true'
        );